﻿var tipOffTimeout = null;

function TopicTipOn(anchor, id, event) {
    var targetY = document.documentElement.scrollTop + event.clientY + 18;
    var targetX = document.documentElement.scrollLeft + event.clientX + 12;

    var topicTip = document.getElementById("TopicTip");
    if (null != topicTip) {
        topicTip.style.left = targetX + "px";
        topicTip.style.top = targetY + "px";
        var tip = document.getElementById(id);
        if (null != tip) {
            topicTip.innerHTML = tip.innerHTML;
            topicTip.style.display = "block";
        }
    }
    if (tipOffTimeout != null)
        window.clearTimeout(tipOffTimeout);
    tipOffTimeout = window.setTimeout("TopicTipOff()", 4000, "JavaScript");
}

function TopicTipOff() {
    if (tipOffTimeout != null)
        window.clearTimeout(tipOffTimeout);
    tipOffTimeout = null;
    document.getElementById("TopicTip").style.display = "none";
}

